package org.rabbitmq.mq02.mqServer.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.rabbitmq.mq02.mqServer.core.Binding;
import org.rabbitmq.mq02.mqServer.core.Exchange;
import org.rabbitmq.mq02.mqServer.core.MSGQueue;
import java.util.List;

/**
 * 创建表
 */
@Mapper
public interface MetaMapper {
    //创建交换机 队列 绑定关系表
    void createExchangeTable();
    void createQueueTable();
    void createBindingTable();

    //新增数据
    void insertExchange(Exchange exchange);
    void insertQueue(MSGQueue queue);
    void insertBinding(Binding binding);

    //删除数据
    void deleteExchange(String exchangeName);
    void deleteQueue(String queueName);
    void deleteBinding(String bindingKey);

    //查询数据
    List<Exchange> selectAllExchanges();
    List<MSGQueue> selectAllQueues();
    List<Binding> selectAllBindings();
}
